翻訳と辞書
Words near each other
・ constructor
・ consul
・ consultant
・ container class
・ content addressable memory
・ content data model
・ content-based information retrieval
・ content-free
・ contention slot
・ context
context clash
・ context dependent information language
・ context switch
・ context-free
・ context-sensitive menu
・ contextually communicating sequential processes
・ continental drift
・ continuation
・ continuation passing style
・ continuations


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

context clash : FOLDOC
context clash
When a parser cannot tell which alternative {production} of a syntax applies by looking at the next input token ("lexeme").
E.g. given syntax
C -> A | b c

A -> d | b e

If you're parsing non-terminal C and the next token is 'b', you don't know whether it's the first or second alternative of C since they both can start with b.
To discover whether a grammar has a context clash:
For each non-terminal, N, with multiple alternatives, look at the first symbol of each alternative's right-hand side, call it s. If s is the empty string, then find the set FOLLOWER(N) otherwise find the set FIRST*(s). If any of the sets for N's alternatives intersect then there will be a context clash when parsing N. If the next input symbol is one of those in the intersection of two sets then you won't know which of the alternatives applies.
FIRST(s) is the set of symbols with which s can start, including s itself. If s is a non-terminal then FIRST(s) also includes the fir


スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.